<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
	<title>员工管理</title>
</head>
<body bgcolor="D9DFAA">
<s:set name="student" value="#request.student"/>
<s:form name="frm" method="post" enctype="multipart/form-data">
	<table>
		<tr>
			<td>
				<table>
					<tr>
						<td>姓名:</td><td><input type="text" name="xm" value="<s:property value="#student.xm"/>"/></td>
					</tr>
					<tr>
						<td><s:radio list="{'男','女'}" label="性别" name="student.xb" value="#student.xb"/></td>
					</tr>
					<tr>
						<td>出生年月:</td><td><input type="text" name="student.cssj" value="<s:date name="#student.cssj" format="yyyy-MM-dd"/>"/></td>
					</tr>
					<tr>
						<td>联系方式:</td><td><input type="text" name="student.cssj" value="<s:date name="#student.cssj" format="yyyy-MM-dd"/>"/></td>
					</tr>
					<tr>
						<s:file name="photo" accept="image/*" label="照片" onchange="document.all['image'].src=this.value;"/>
					</tr>
					<tr>
						<td></td>
						<td><img src="getImage.action?xm=<s:property value="#student.xm"/>" width="90" height="120"/></td>
					</tr>
					<tr>
						<td></td>
						<td>
							<input name="btn1" type="button" value="录入" onclick="add()">
							<input name="btn2" type="button" value="删除" onclick="del()">
							<input name="btn3" type="button" value="更新" onclick="upd()">
							<input name="btn4" type="button" value="查询" onclick="que()">
						</td>
					</tr>
				</table>
			</td>
			<td>
				<table>
					<tr>
						<td>所在部门<input type="text" name="student.kcs" value="<s:property value="#student.kcs"/>" disabled/></td>
					</tr>
					<tr>
						<td align="left">
							<table border=1>
								<tr bgcolor=#CCCCC0>
									<td>部门名</td>
									<td align=center>绩点</td>
								</tr>
								<s:iterator value="#request.scoreList" id="sco">
								<tr>
									<td><s:property value="#sco.kcm"/>&nbsp;</td>
									<td align="center"><s:property value="#sco.cj"/></td>
								</tr>
								</s:iterator>
							</table>
						</td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
	<s:property value="msg"/>
</s:form>
</body>
</html>
<script type="text/javascript">
function add() {
	document.frm.action="addStu.action";
	document.frm.submit();
}
function del() {
	document.frm.action="delStu.action";
	document.frm.submit();
}
function upd() {
	document.frm.action="updStu.action";
	document.frm.submit();
}
function que() {
	document.frm.action="queStu.action";
	document.frm.submit();
}
</script>